import type { AddressItem } from "@/types/address";
import { defineStore } from "pinia";
import { ref } from "vue";

export const useAddressStore = defineStore('address', () => {
  // 选择收货地址
  const slectedAddress = ref<AddressItem>()
  const chnangeselectedAddress = (address: AddressItem) => {
    slectedAddress.value = address
  }
  return {
    slectedAddress,
    chnangeselectedAddress
  }
})